package ${basePackage}.entity;
 
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

import org.hibernate.validator.constraints.NotBlank;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 
 * ${className} Entity
 * 
 * @author creator
 * 
 * @since ${date?datetime}
 */
 @Entity
 @Table(name="${tableName}")
public class ${className} implements Serializable{

	private static final long serialVersionUID = 1L;
	
	<#list records as rec>
	<#if config.xlsAnnotation>@Description(comment = "${rec.comment}", size = 18)</#if>
	private ${rec.type} ${rec.field?uncap_first} <#if rec.defaultValue?? > = ${rec.defaultValue}</#if>;
	
	</#list> 
	
	<#list records as rec> 
	<#if rec.comment!="">
	/**
	 * ${rec.comment}
	 */
	</#if>
	<#if rec.nul =='NO' && rec.pk !='PRI'>@NotBlank</#if>
	<#if rec.pk =='PRI'>
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	</#if>
	public ${rec.type} get${rec.field?cap_first}() {
		return this.${rec.field?uncap_first};
	}
	
	/**
	 * @param ${rec.field?uncap_first} ${rec.comment}
	 */
	public void set${rec.field?cap_first}(${rec.type} ${rec.field?uncap_first}) {
		this.${rec.field?uncap_first} = ${rec.field?uncap_first};
	}
	
	</#list>  
	

	@Override
	public String toString()
	{
		 return ToStringBuilder.reflectionToString(this);
	}
 
	
}